<template>
  <div id="app">
    <router-view v-if="isRouterAlive"/>
  </div>
</template>

<script>
export default {
  name: "App",
  data() {
    return {
      isRouterAlive: true,
    };
  },
  provide() {
    return {
      reload: this.reload,
    };
  },
  methods: {
    reload() {
      this.isRouterAlive = false;
      this.$nextTick(function () {
        this.isRouterAlive = true;
      });
    },
  },
  // mounted () {
  //   this.$nextTick(() => {
  //     this.autoRootFontSize()
  //     window.addEventListener('resize', this.autoRootFontSize)
  //   })
  // },
  // methods: {
  //   autoRootFontSize () { // Rem自适应
  //     document.documentElement.style.fontSize = Math.min(screen.width, document.documentElement.getBoundingClientRect().width) / 192 + 'px'
  //   }
  // }
};
</script>
<style lang="less" scoped>
#app {
  height: 100%;
  min-width: 1366px;
  margin: 0;
}
</style>
